﻿Public Class uctest

    Private Sub ButtonXBack_Click(sender As Object, e As EventArgs) Handles ButtonXBack.Click
        Dim uc As New uctest
        Me.Controls.Add(uc)
        Dim parent = DirectCast(Application.OpenForms.Item(0), Main)
        parent.CloseModalPanel(uc, DevComponents.DotNetBar.Controls.eSlideSide.Right)
    End Sub

    Private Sub ButtonXedit_Click(sender As Object, e As EventArgs)
        'If ButtonXedit.Text = "Lưu" Then
        '    ButtonXedit.Text = "Thay đổi"
        '    LabelXname.Visible = True
        '    LabelXname.Text = TextBoxXname.Text
        '    TextBoxXname.Visible = False
        'Else
        '    LabelXname.Visible = False
        '    TextBoxXname.Text = LabelXname.Text
        '    TextBoxXname.Visible = True
        '    TextBoxXname.Focus()
        '    ButtonXedit.Text = "Lưu"
        'End If

    End Sub

    Private Sub ButtonItemEdit_Click(sender As Object, e As EventArgs) Handles ButtonItemEdit.Click
        If ButtonItemEdit.Text = "Edit" Then
            ButtonItemEdit.Text = "Save"
            Dim tamp = ButtonItemEdit.Image
            ButtonItemEdit.Image = ButtonItemSave.Image
            ButtonItemSave.Image = tamp

            LabelItemName.Visible = False
            TextBoxItemName.Text = LabelItemName.Text
            TextBoxItemName.Visible = True
            ItemPanel2.Refresh()
            TextBoxItemName.Focus()

        Else
            ButtonItemEdit.Text = "Edit"
            Dim tamp = ButtonItemEdit.Image
            ButtonItemEdit.Image = ButtonItemSave.Image
            ButtonItemSave.Image = tamp

            'LabelXname.ForeColor = Color.White

            LabelItemName.Visible = True
            LabelItemName.Text = TextBoxItemName.Text
            TextBoxItemName.Visible = False
            ItemPanel2.Refresh()
        End If

    End Sub

    'Private Sub ButtonItemSave_Click(sender As Object, e As EventArgs) Handles ButtonItemSave.Click
    '    LabelItemName.Visible = True
    '    LabelItemName.Text = TextBoxItemName.Text
    '    TextBoxItemName.Visible = False
    'End Sub

    'Private Sub PictureBox1_MouseMove(sender As Object, e As MouseEventArgs)
    '    PictureBox1.BackColor = Color.LightBlue
    'End Sub

    'Private Sub PictureBox1_MouseLeave(sender As Object, e As EventArgs)
    '    PictureBox1.BackColor = Color.Transparent
    'End Sub

    Private Sub PictureBox1_Click(sender As Object, e As EventArgs)
        MessageBox.Show("test")
    End Sub

    Private Sub ButtonItemSaveName_Click(sender As Object, e As EventArgs)

    End Sub

    Private Sub ButtonItemEditName_Click(sender As Object, e As EventArgs)

    End Sub
End Class
